package cn.gson.boot.model.pojos;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

public class YuangongJuesePK implements Serializable {
    private int empId;
    private int jueId;

    @Column(name = "emp_id", nullable = false)
    @Id
    public int getEmpId() {
        return empId;
    }

    public void setEmpId(int empId) {
        this.empId = empId;
    }

    @Column(name = "jue_id", nullable = false)
    @Id
    public int getJueId() {
        return jueId;
    }

    public void setJueId(int jueId) {
        this.jueId = jueId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YuangongJuesePK that = (YuangongJuesePK) o;
        return empId == that.empId &&
                jueId == that.jueId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(empId, jueId);
    }
}
